<?php
/**  
* index.php
* 필요한 경우 layout모듈 적용 
*/

require_once($_SERVER['DOCUMENT_ROOT'].'/2013p79/common/_init.php');  //  ['HTTP_HOST']  ['DOCUMENT_ROOT']
require_once(CLASS_PATH."/__autoload.php");

class Homepage extends PageSite
{
	protected $subTitle;
	protected $control, $value, $args, $ctrl, $mod;
	
	public function __construct()
	{
	  parent::__construct();	
 //     $this->set_subTitle('HOME');	  
	}

   public function get_content()
   {
	  $mod = new Intro($this); 
	  $intro = $mod->create();
	
      return <<<EOD
	  
$intro

EOD;
	}
}


class Intro extends Module
{
	public function __construct($page)
	{
	  parent::__construct($page);	
	}
	
   	public function get_content()
   	{
	   return <<< EOD
	   
Intro Page

<img src='http://placehold.it/200x100' />

EOD;
   	}  
   
}

?>

<?php
$page = new Homepage;  
$page->create();

echo $page->get_page();
?>